package com.game.view.component
{
	import com.game.engine.phys.Vector2D;
	import com.game.manager.AnimationManager;
	import base.BaseObject;
	
	import com.dusk.util.ResUtil;
	import com.game.view.IAnimation;
	
	import flash.display.MovieClip;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	public class TransDoor extends BaseObject
	{
		public function TransDoor()
		{
			super();
			velocity = Vector2D.zero;
			gravity = 0;
		}
		
		override protected function initCollideArea():void
		{
			collideBox = new Rectangle(-35,-70,70,70);
		}
		
		override protected function initBBDC():void
		{
//			content = BaseAnimationPool.getAnimationClip(ResUtil.getComponentViewKey("TransferDoor"));
			content = ResUtil.getComponentView("TransferDoor") as MovieClip;
			addChild(content);
		}
		
		override public function render(ratio:Number = 1):void
		{
		
		}
		
		override public function renderAnimate():void
		{
			var mc:MovieClip = (content.getChildAt(0)) as MovieClip;
			if(mc.currentFrame == mc.totalFrames)
			{
				mc.gotoAndStop(1);
			}
			mc.nextFrame();
		}
		
		override public function destroy():void
		{
			removeChild(content);
			content = null;
			isReadyToDestroy = true;
		}
	}
}